module.exports = (options) => {
	const uniID = require('uni-id')
	const uniCaptcha = require('uni-captcha')
	// 返回中间件函数
	return async function user(ctx, next) {
		const {event} = ctx
		ctx.$id = uniID.createInstance({
			context:ctx 
		})
		await next();
	};
};
